package org.example.order.controller;

import cn.lingyangwl.framework.core.response.Resp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.example.order.model.entity.OrderDO;
import org.example.order.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author shenguangyang
 */
@Api(tags = "订单")
@RestController
public class OrderController {
    @Resource
    OrderService orderService;

    @ApiOperation(value = "创建订单")
    @GetMapping("/order/create")
    public Resp<?> create(OrderDO orderDO) {
        orderService.create(orderDO);
        return Resp.ok("创建订单成功");
    }
}
